package org.performancetracker.jdbc4;

import java.sql.*;
import java.math.BigDecimal;
import java.util.Map;
import java.util.Calendar;
import java.net.URL;
import java.io.InputStream;
import java.io.Reader;

/**
 * @author: jaronschut
 */

public abstract class AbstractCallableMonitoringStatement extends AbstractPreparedMonitoringStatement implements CallableStatement {

    /**
     * To override in any subclass.
     *
     * @return
     */
    abstract protected CallableStatement getRealStatement();

    /**
     * To override in any subclass.
     *
     * @return
     */
    abstract protected Connection getRealConnection();

    public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException {
        getRealStatement().registerOutParameter(parameterIndex, sqlType);
    }

    public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException {
        getRealStatement().registerOutParameter(parameterIndex, sqlType, scale);
    }

    public boolean wasNull() throws SQLException {
        return getRealStatement().wasNull();
    }

    public String getString(int parameterIndex) throws SQLException {
        return getRealStatement().getString(parameterIndex);
    }

    public boolean getBoolean(int parameterIndex) throws SQLException {
        return getRealStatement().getBoolean(parameterIndex);
    }

    public byte getByte(int parameterIndex) throws SQLException {
        return getRealStatement().getByte(parameterIndex);
    }

    public short getShort(int parameterIndex) throws SQLException {
        return getRealStatement().getShort(parameterIndex);
    }

    public int getInt(int parameterIndex) throws SQLException {
        return getRealStatement().getInt(parameterIndex);
    }

    public long getLong(int parameterIndex) throws SQLException {
        return getRealStatement().getLong(parameterIndex);
    }

    public float getFloat(int parameterIndex) throws SQLException {
        return getRealStatement().getFloat(parameterIndex);
    }

    public double getDouble(int parameterIndex) throws SQLException {
        return getRealStatement().getDouble(parameterIndex);
    }

    public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException {
        return getRealStatement().getBigDecimal(parameterIndex, scale);
    }

    public byte[] getBytes(int parameterIndex) throws SQLException {
        return getRealStatement().getBytes(parameterIndex);
    }

    public Date getDate(int parameterIndex) throws SQLException {
        return getRealStatement().getDate(parameterIndex);
    }

    public Time getTime(int parameterIndex) throws SQLException {
        return getRealStatement().getTime(parameterIndex);
    }

    public Timestamp getTimestamp(int parameterIndex) throws SQLException {
        return getRealStatement().getTimestamp(parameterIndex);
    }

    public Object getObject(int parameterIndex) throws SQLException {
        return getRealStatement().getObject(parameterIndex);
    }

    public BigDecimal getBigDecimal(int parameterIndex) throws SQLException {
        return getRealStatement().getBigDecimal(parameterIndex);
    }

    public Object getObject(int i, Map<String, Class<?>> map) throws SQLException {
        return getRealStatement().getObject(i, map);
    }

    public Ref getRef(int i) throws SQLException {
        return getRealStatement().getRef(i);
    }

    public Blob getBlob(int i) throws SQLException {
        return getRealStatement().getBlob(i);
    }

    public Clob getClob(int i) throws SQLException {
        return getRealStatement().getClob(i);
    }

    public Array getArray(int i) throws SQLException {
        return getRealStatement().getArray(i);
    }

    public Date getDate(int parameterIndex, Calendar cal) throws SQLException {
        return getRealStatement().getDate(parameterIndex, cal);
    }

    public Time getTime(int parameterIndex, Calendar cal) throws SQLException {
        return getRealStatement().getTime(parameterIndex, cal);
    }

    public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException {
        return getRealStatement().getTimestamp(parameterIndex, cal);
    }

    public void registerOutParameter(int paramIndex, int sqlType, String typeName) throws SQLException {
        getRealStatement().registerOutParameter(paramIndex, sqlType, typeName);
    }

    public void registerOutParameter(String parameterName, int sqlType) throws SQLException {
        getRealStatement().registerOutParameter(parameterName, sqlType);
    }

    public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException {
        getRealStatement().registerOutParameter(parameterName, sqlType, scale);
    }

    public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException {
        getRealStatement().registerOutParameter(parameterName, sqlType, typeName);
    }

    public URL getURL(int parameterIndex) throws SQLException {
        return getRealStatement().getURL(parameterIndex);
    }

    public void setURL(String parameterName, URL val) throws SQLException {
        getRealStatement().setURL(parameterName, val);
    }

    public void setNull(String parameterName, int sqlType) throws SQLException {
        getRealStatement().setNull(parameterName, sqlType);
    }

    public void setBoolean(String parameterName, boolean x) throws SQLException {
        getRealStatement().setBoolean(parameterName, x);
    }

    public void setByte(String parameterName, byte x) throws SQLException {
        getRealStatement().setByte(parameterName, x);
    }

    public void setShort(String parameterName, short x) throws SQLException {
        getRealStatement().setShort(parameterName, x);
    }

    public void setInt(String parameterName, int x) throws SQLException {
        getRealStatement().setInt(parameterName, x);
    }

    public void setLong(String parameterName, long x) throws SQLException {
        getRealStatement().setLong(parameterName, x);
    }

    public void setFloat(String parameterName, float x) throws SQLException {
        getRealStatement().setFloat(parameterName, x);
    }

    public void setDouble(String parameterName, double x) throws SQLException {
        getRealStatement().setDouble(parameterName, x);
    }

    public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException {
        getRealStatement().setBigDecimal(parameterName, x);
    }

    public void setString(String parameterName, String x) throws SQLException {
        getRealStatement().setString(parameterName, x);
    }

    public void setBytes(String parameterName, byte[] x) throws SQLException {
        getRealStatement().setBytes(parameterName, x);
    }

    public void setDate(String parameterName, Date x) throws SQLException {
        getRealStatement().setDate(parameterName, x);
    }

    public void setTime(String parameterName, Time x) throws SQLException {
        getRealStatement().setTime(parameterName, x);
    }

    public void setTimestamp(String parameterName, Timestamp x) throws SQLException {
        getRealStatement().setTimestamp(parameterName, x);
    }

    public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException {
        getRealStatement().setAsciiStream(parameterName, x, length);
    }

    public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException {
        getRealStatement().setBinaryStream(parameterName, x, length);
    }

    public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException {
        getRealStatement().setObject(parameterName, x, targetSqlType, scale);
    }

    public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException {
        getRealStatement().setObject(parameterName, x, targetSqlType);
    }

    public void setObject(String parameterName, Object x) throws SQLException {
        getRealStatement().setObject(parameterName, x);
    }

    public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException {
        getRealStatement().setCharacterStream(parameterName, reader, length);
    }

    public void setDate(String parameterName, Date x, Calendar cal) throws SQLException {
        getRealStatement().setDate(parameterName, x, cal);
    }

    public void setTime(String parameterName, Time x, Calendar cal) throws SQLException {
        getRealStatement().setTime(parameterName, x, cal);
    }

    public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException {
        getRealStatement().setTimestamp(parameterName, x, cal);
    }

    public void setNull(String parameterName, int sqlType, String typeName) throws SQLException {
        getRealStatement().setNull(parameterName, sqlType, typeName);
    }

    public String getString(String parameterName) throws SQLException {
        return getRealStatement().getString(parameterName);
    }

    public boolean getBoolean(String parameterName) throws SQLException {
        return getRealStatement().getBoolean(parameterName);
    }

    public byte getByte(String parameterName) throws SQLException {
        return getRealStatement().getByte(parameterName);
    }

    public short getShort(String parameterName) throws SQLException {
        return getRealStatement().getShort(parameterName);
    }

    public int getInt(String parameterName) throws SQLException {
        return getRealStatement().getInt(parameterName);
    }

    public long getLong(String parameterName) throws SQLException {
        return getRealStatement().getLong(parameterName);
    }

    public float getFloat(String parameterName) throws SQLException {
        return getRealStatement().getFloat(parameterName);
    }

    public double getDouble(String parameterName) throws SQLException {
        return getRealStatement().getDouble(parameterName);
    }

    public byte[] getBytes(String parameterName) throws SQLException {
        return getRealStatement().getBytes(parameterName);
    }

    public Date getDate(String parameterName) throws SQLException {
        return getRealStatement().getDate(parameterName);
    }

    public Time getTime(String parameterName) throws SQLException {
        return getRealStatement().getTime(parameterName);
    }

    public Timestamp getTimestamp(String parameterName) throws SQLException {
        return getRealStatement().getTimestamp(parameterName);
    }

    public Object getObject(String parameterName) throws SQLException {
        return getRealStatement().getObject(parameterName);
    }

    public BigDecimal getBigDecimal(String parameterName) throws SQLException {
        return getRealStatement().getBigDecimal(parameterName);
    }

    public Object getObject(String parameterName, Map<String, Class<?>> map) throws SQLException {
        return getRealStatement().getObject(parameterName, map);
    }

    public Ref getRef(String parameterName) throws SQLException {
        return getRealStatement().getRef(parameterName);
    }

    public Blob getBlob(String parameterName) throws SQLException {
        return getRealStatement().getBlob(parameterName);
    }

    public Clob getClob(String parameterName) throws SQLException {
        return getRealStatement().getClob(parameterName);
    }

    public Array getArray(String parameterName) throws SQLException {
        return getRealStatement().getArray(parameterName);
    }

    public Date getDate(String parameterName, Calendar cal) throws SQLException {
        return getRealStatement().getDate(parameterName, cal);
    }

    public Time getTime(String parameterName, Calendar cal) throws SQLException {
        return getRealStatement().getTime(parameterName, cal);
    }

    public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException {
        return getRealStatement().getTimestamp(parameterName, cal);
    }

    public URL getURL(String parameterName) throws SQLException {
        return getRealStatement().getURL(parameterName);
    }
}